import Vue from 'vue'
import Router from 'vue-router'
import store from '../vuex/store'
import config from './config'

Vue.use(Router)

import IndexView from '../views/IndexView.vue'
// 账号密码
import LoginView from '../views/LoginView.vue'
import ForgetView from '../views/ForgetView.vue'
import ResetView from '../views/ResetPassword.vue'
// 运营
import CustomerView from '../views/CustomerView.vue'

// customer里的view
// 运营
import UserView from '../views/UserView.vue'
import UserIndexView from '../views/UserIndexView.vue'
import TransactionView from '../views/TransactionView.vue'
import TransactionDetailView from '../views/TransactionDetailView.vue'
// 客户
import GuestView from '../views/GuestView.vue'
import GuestIndexView from '../views/GuestIndexView.vue'
// 财务
import AdminView from '../views/AdminView.vue'
import AdminIndexView from '../views/AdminIndexView.vue'
// BD
import OrderView from '../views/OrderView.vue'
import OrderIndexView from '../views/OrderIndexView.vue'
// new 财务
import FinnaceView from '../views/FinnaceView.vue'
import FinnaceIndexView from '../views/FinnaceIndexView.vue'
import BorrowView from '../views/BorrowView.vue'
import BorrowIndexView from '../views/BorrowIndexView.vue'
// ChargeView
import ChargeView from '../views/ChargeView.vue'
import ChargeIndexView from '../views/ChargeIndexView.vue'
// customers
import CustomersView from '../views/CustomersView.vue'
import CustomersIndexView from '../views/CustomersIndexView.vue'
// entryapplyView
import entryapplyView from '../views/entryapplyView.vue'
import entryapplyIndexView from '../views/entryapplyIndexView.vue'
// entryapplyoneView
import entryapplyoneView from '../views/entryapplyoneView.vue'
import entryapplyoneIndexView from '../views/entryapplyoneIndexView.vue'
// yunyingmanagerView
import yunyingmanagerView from '../views/yunyingmanagerView.vue'
import yunyingmanagerIndexView from '../views/yunyingmanagerIndexView.vue'
// indexview
// UsersView
import UsersView from '../views/UsersView.vue'
import UsersIndexView from '../views/UsersIndexView.vue'
// BorrowsView
import BorrowsView from '../views/BorrowsView.vue'
import BorrowsIndexView from '../views/BorrowsIndexView.vue'
// CpaView
import CpaView from '../views/CpaView.vue'
import CpaIndexView from '../views/CpaIndexView.vue'
// FinnacesView
import FinnacesView from '../views/FinnacesView.vue'
import FinnacesIndexView from '../views/FinnacesIndexView.vue'
// ChargesView
import ChargesView from '../views/ChargesView.vue'
import ChargesIndexView from '../views/ChargesIndexView.vue'
// CustomerssView
import CustomerssView from '../views/CustomerssView.vue'
import CustomerssIndexView from '../views/CustomerssIndexView.vue'
// EntryapplysView
import EntryapplysView from '../views/EntryapplysView.vue'
import EntryapplysIndexView from '../views/EntryapplysIndexView.vue'
// EntryapplyonesView
import EntryapplyonesView from '../views/EntryapplyonesView.vue'
import EntryapplyonesIndexView from '../views/EntryapplyonesIndexView.vue'
//
import ChannelInquiryView from '../views/ChannelInquiryView.vue'
import ChannelManagementView from '../views/ChannelManagementView.vue'
import ChannelView from '../views/channelView.vue'
let router = new Router({
    routes: [{
    	path: '/',
    	name: 'default',
    	component: LoginView
    },
    {
        path: '/index',
        name: 'index',
        component: IndexView,
        children:[{
            path:'/users',
            name:'users',
            component:UsersView,
            children:[{
                path:'/users-index',
                name:'users-index',
                component:UsersIndexView
            }]
        },
        
        {
            path:'/borrows',
            name:'borrows',
            component:BorrowsView,
            children:[{
                path:'/borrows-index',
                name:'borrows-index',
                component:BorrowsIndexView
            }]
        },
        {
            path:'/cpa',
            name:'cpa',
            component:CpaView,
            children:[{
                path:'/cpa-index',
                name:'cpa-index',
                component:CpaIndexView
            }]
        },
        {
            path:'/finnaces',
            name:'finnaces',
            component:FinnacesView,
            children:[{
                path:'/finnaces-index',
                name:'finnaces-index',
                component:FinnacesIndexView
            }]
        },
        // charges
        {
            path:'/charges',
            name:'charges',
            component:ChargesView,
            children:[{
                path:'/charges-index',
                name:'charges-index',
                component:ChargesIndexView
            }]
        },
        {
            path:'/customerss',
            name:'customerss',
            component:CustomerssView,
            children:[{
                path:'/customerss-index',
                name:'customerss-index',
                component:CustomerssIndexView
            }]
        },
        {
            path:'/entryapplys',
            name:'entryapplys',
            component:EntryapplysView,
            children:[{
                path:'/entryapplys-index',
                name:'entryapplys-index',
                component:EntryapplysIndexView
            }]
        },
        // entryapplyones
        {
            path:'/entryapplyones',
            name:'entryapplyones',
            component:EntryapplyonesView,
            children:[{
                path:'/entryapplyones-index',
                name:'entryapplyones-index',
                component:EntryapplyonesIndexView
            }]
        },

    
    ]
    },
    // 账号密码
    {
        path: '/login', name: 'login', component: LoginView
    },
    {
        path: '/forget', name: 'forget', component: ForgetView
    },
    {
        path: '/reset/:id', name: 'reset', component: ResetView
    },
    // 运营
    {
        path: '/customer',
        name: 'customer', 
        component: CustomerView,
        children:[{
            path:'/user',
            name:'user',
            component:UserView,
            children:[{
                path:'/user-index',
                name:'user-index',
                component:UserIndexView
            }]
        },
       
        {
            path:'/transition',
            name:'transition',
            component:TransactionView,
            children:[{
                path:'/transition-index',
                name:'transition-index',
                component:TransactionDetailView
            }]
        },
        {
            path:'/borrow',
            name:'borrow',
            component:BorrowView,
            children:[{
                path:'/borrow-index',
                name:'borrow-index',
                component:BorrowIndexView
            }]
        },
        /*{
            path:'/guest',
            name:'guest',
            component:ChannelView,
            children:[{
                path:'/guest-index',
                name:'guest-index',
                component:GuestIndexView
            }]
        },*/
        {
            path:'/channel',
            name:'channel',
            component:ChannelView,
            children:[{
                path:'/channel-management',
                name:'channel-management',
                component:ChannelManagementView
            }]
        },
        {
            path:'/channel',
            name:'channel',
            component:ChannelView,
            children:[{
                path:'/channel-inquiry',
                name:'channel-inquiry',
                component:ChannelInquiryView
            }]
        },
        {
            path:'/admin',
            name:'admin',
            component:AdminView,
            children:[{
                path:'/admin-index',
                name:'admin-index',
                component:AdminIndexView
            }]
        },
        /*{
            path:'/channel',
            name:'channel',
            component:ChannelView,
            children:[{
                path:'/guest-index',
                name:'guest-index',
                component:GuestIndexView
            }]
        },*/
        {
            path: '/order', 
            name: 'order',
            component: OrderView,
            children:[{
                path:'/order-index',
                name:'order-index',
                component:OrderIndexView
            }]
        },
        // {
        //     path: '/order', 
        //     name: 'order',
        //     component: OrderView,
        //     children:[{
        //         path:'/order-index',
        //         name:'order-index',
        //         component:OrderIndexView
        //     }]
        // },
        {
            path: '/finnace', 
            name: 'finnace',
            component: FinnaceView,
            children:[{
                path:'/finnace-index',
                name:'finnace-index',
                component:FinnaceIndexView
            }]
        },
        {
            path: '/charge', 
            name: 'charge',
            component: ChargeView,
            children:[{
                path:'/charge-index',
                name:'charge-index',
                component:ChargeIndexView
            }]
        },
        // customers
        {
            path: '/customers', 
            name: 'customers',
            component: CustomersView,
            children:[{
                path:'/customers-index',
                name:'customers-index',
                component:CustomersIndexView
            }]
        },
        // 进件申请
        {
            path: '/entryapply', 
            name: 'entryapply',
            component: entryapplyView,
            children:[{
                path:'/entryapply-index',
                name:'entryapply-index',
                component:entryapplyIndexView
            }]
        },
        // 进件申请记录
        {
            path: '/entryapplyone', 
            name: 'entryapplyone',
            component: entryapplyoneView,
            children:[{
                path:'/entryapplyone-index',
                name:'entryapplyone-index',
                component:entryapplyoneIndexView
            }]
        },
        // 运营管理
        {
            path: '/yunyingmanager', 
            name: 'yunyingmanager',
            component: yunyingmanagerView,
            children:[{
                path:'/yunyingmanager-index',
                name:'yunyingmanager-index',
                component:yunyingmanagerIndexView
            }]
        },

       
    ]

    },
    {
        path: '*', redirect: '/'
    }]
})

new config(router).render()

export default router
